import java.io.IOException;
import java.net.SocketException;
import java.util.HashMap;

public class UdpServe1 extends UdpServe{
    private HashMap<String,String>dict=new HashMap<>();
    public UdpServe1(int port) throws SocketException {
        super(port);
       dict.put("cat","小猫");
       dict.put("money","小钱");

    }

    @Override
    public String process(String request) {
        return dict.getOrDefault(request,"字典中没有查到");

    }

    public static void main(String[] args) throws IOException {
        UdpServe1 serve1=new UdpServe1(9090);
        serve1.start();

    }
}
